package team.yidong.fenda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import team.yidong.fenda.entity.HospitalProfile;

import java.util.List;

/**
 * Created by xuanlong on 2018/3/17.
 */
@Repository
public interface HospitalProfileRepository extends JpaRepository<HospitalProfile, Integer> {
    @Query("select profile from HospitalProfile profile where profile.hospitalId=?1 and profile.status='use'")
    List<HospitalProfile> findByHospitalId(Integer hospitalId);
}
